package com.xiaoma.exception;

import com.xiaoma.code.RpcError;

/**
 * @Author: xiaoma
 * @Date: 2021/7/5 14:57
 * @description: RPC调用异常
 */
public class RpcException extends RuntimeException {
    public RpcException(RpcError error, String detail) {
        super(error.getMessage() + ": " + detail);
    }
    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }
    public RpcException(RpcError error) {
        super(error.getMessage());
    }
}
